# coding: utf-8

from exts import db
from server.utils.enums.genderEnum import GenderEnum


class User(db.Model):
    """
    基金净值
    """
    __tablename__ = "user"
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, nullable=False, comment="ID")
    user = db.Column(db.String(20), nullable=False, unique=True, index=True, comment="用户")
    name = db.Column(db.String(20), nullable=False, comment="昵称")
    password = db.Column(db.String(128), nullable=False, comment="密码")
    initial_flag = db.Column(db.Boolean, nullable=False, default=True, comment="初始化密码标识")
    avatar = db.Column(db.String(120), nullable=False, default="../Assets/images/header.jpeg", comment="头像图片地址")
    gender = db.Column(db.Char(1), nullable=False, default=GenderEnum.MALE, comment="性别")
